$(document).ready(function(){
	showTime();
});

function showTime(){
      var nowTime = new Date();
      var nowYear = nowTime.getFullYear();
      var nowMonth = nowTime.getMonth()+1;
      var nowDay = nowTime.getDate();
      var nowHours = nowTime.getHours();
      var nowMinutes = nowTime.getMinutes();
      var nowSeconds = nowTime.getSeconds();
      var nowWeek = nowTime.getDay();
      var weekSigne="";
      switch(nowWeek){
         case 0:
            weekSigne="星期日";
            break;
         case 1:
            weekSigne="星期一";
            break;
         case 2:
            weekSigne="星期二";
            break;
         case 3:
            weekSigne="星期三";
            break;      
         case 4:
            weekSigne="星期四";
            break;
         case 5:
            weekSigne="星期五";
            break;      
         case 6:
            weekSigne="星期六";
            break;   
      }
      var signe="上午";
      if(nowHours>12){
         nowHours= nowHours-12;
         signe="下午";
      }
      if(nowHours<10){
         nowHours="0"+nowHours;
      }
      if(nowMinutes<10){
         nowMinutes="0"+nowMinutes;
      }
      if(nowSeconds<10){
         nowSeconds="0"+nowSeconds;
      }
      $('#riqi').html('日期： '+nowYear+'年'+nowMonth+'月'+nowDay+'日   '+weekSigne);
      
 }